package com.psl.action.add;

import com.psl.services.work.ProductServices;
import org.apache.struts2.ServletActionContext;

import javax.servlet.http.HttpServletRequest;

/**
 * Created by mioko on 2017/9/15.
 */
public class save_invoicelist {
    public String execute() {
        HttpServletRequest request = ServletActionContext.getRequest();
        String p_no = request.getParameter("p_no");
        String p_name = request.getParameter("p_name");
        String p_size = request.getParameter("p_size");
        String p_r = request.getParameter("p_r");
        String p_n = request.getParameter("p_n");
        String p_uw = request.getParameter("p_uw");
        String p_up = request.getParameter("p_up");
        String p_zx = request.getParameter("p_zx");
        System.out.println("action:"+p_no+" "+p_name+" "+p_size+" "+p_r+" "+p_n+" "+p_uw+" "+p_up+" "+p_zx);
        ProductServices ps=new ProductServices();
        ps.insertProduct(p_no,p_name,p_size,p_r,p_n,p_uw,p_up,p_zx);
        ps.queryAllProduct();
        return "success";
    }
}
